# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.


from odoo import api, fields, models, _
import time


def bmx_check_method(fapiao):
    print('bmx_check_method', fapiao)
    time.sleep(3)
    return [{'id': one.id, 'state': 'done'} for one in fapiao]


class FapiaoCheckProvider(models.Model):
    _inherit = "fp.check.provider"

    def _request_methods(self):
        result = super()._request_methods()
        result2 = result.copy()
        result2.update({'bmx': bmx_check_method})
        return result2
